---
title: ClaimAppManager
summary: API reference for ClaimAppManager.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Application.Claim
reference_type: embedded
---

# ClaimAppManager

`ClaimAppManager` is the abstract base class every claim-oriented application manager in the LegalMaintenance solution inherits from. It fixes the claim lifecycle template — establish context, retrieve the claim, evaluate confidentiality, retrieve screen data, and (on save) run inside a bracketed transaction — and provisions the Oracle claim data portal (`ClaimDPI`) that every downstream business object uses. It never writes SQL itself; claim retrieval and the security-override lookup are delegated to `SAIF.BOF.Business.View.Claim`.

## Purpose
- Owns the only supported entry points for binding a manager to a claim or worker ([BR-CLM-001](../../business-rules.md#br-clm-001-claim-context-key-validation)).
- Fixes the context-change pipeline order (retrieve → security → screen data) ([BR-CLM-003](../../business-rules.md#br-clm-003-fixed-context-change-pipeline-order)).
- Provisions the Oracle claim data portal and pins the database user to `CLM` ([BR-CLM-013](../../business-rules.md#br-clm-013-claim-database-user-pinned-to-clm)).
- Brackets every claim save inside exactly one transaction ([BR-CLM-015](../../business-rules.md#br-clm-015-single-transaction-per-save), [BR-CLM-016](../../business-rules.md#br-clm-016-commit-only-on-success)).
- Supplies consistently-configured ancillary handles (imaging client, claim task generator) to every derived manager.

## Context
- Namespace: `SAIF.Application.Claim`
- Assembly/package: `SAIF.Application.Claim` (embedded, ProjectReference)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New` | `Public Sub New(inSecurityPrincipal As clsSecurityPrincipal)` | Only constructor; forwards the identity to `AppManagerBase.New`. |
| `ApplicationTitle` | `Public Overridable ReadOnly Property As String` | Composes the claim-screen header from the SAIF claim number and worker name, or returns empty when no valid claim is loaded ([BR-CLM-021](../../business-rules.md#br-clm-021-application-title-composition)). |
| `ClaimSecurity` | `Public Overridable ReadOnly Property As ClaimSecurity` | Lazily builds the per-claim confidentiality evaluator bound to the current security principal. |
| `ClaimImageApiClient` | `Public ReadOnly Property As ImagingAPI.Client.ImagingClient` | Lazily builds an imaging API client from the `imagingapiurl` configuration setting, giving every derived manager the same imaging endpoint ([BR-CLM-022](../../business-rules.md#br-clm-022-imaging-endpoint-resolved-once-per-manager)). |
| `ClaimData` | `Public ReadOnly Property As clsClaimData` | The claim business object retrieved for the current context; `Nothing` until a context is set. |
| `EmployeeData` | `Public ReadOnly Property As clsEmployeeData` | Lazily resolves the employee record of the logged-in user, cached for the manager's lifetime.** |
| `DPI(inKey)` | `Public ReadOnly Property (Optional inKey As String = ClaimAppConstants.DPIClaimKey) As IDataPortalInfo` | Returns the Oracle data-portal handle for `inKey`, defaulting to the claim portal key `ClaimDPI`. |
| `MailMessage` | `Public Overridable Property As String` | Buffer for an outbound notification body composed by derived managers.* |
| `Context` | `Protected Overridable ReadOnly Property As ClaimContext` | Current claim/worker context values. |
| `Tasks` | `Protected Overridable ReadOnly Property As clsClaimTaskGenerator` | Task generator for claim-related task creation; `Nothing` until `NewTaskGenerator` runs. |
| `ConfidentialAccessDeniedMessage` | `Protected ReadOnly Property As String` | Composes the adjuster-referral denial text, falling back to the generic confidential-claim message ([BR-CLM-011](../../business-rules.md#br-clm-011-confidential-access-denial-referral)). |
| `SetClaimContext` | `Public Overridable Sub (inClaimNumber As String)` / `(inClaimID As Decimal)` | Establishes claim context by SAIF claim number or claim id and runs the full context-change pipeline ([BR-CLM-001](../../business-rules.md#br-clm-001-claim-context-key-validation)). |
| `SetWorkerContext` | `Public Overridable Sub (inWorkerID As Decimal)` | Establishes context by worker id and runs the context-change pipeline. |
| `Retrieve` | `Public Overrides Function As Boolean` | Runs `OnRetrieve()` when the context is valid; always returns `False` regardless of outcome ([BR-CLM-020](../../business-rules.md#br-clm-020-retrieve-never-reports-success)). |
| `Write` | `Public Overrides Function As Boolean` | Runs the transaction-bracketed save: begin transaction → `OnWrite` → commit/rollback ([BR-CLM-015](../../business-rules.md#br-clm-015-single-transaction-per-save), [BR-CLM-016](../../business-rules.md#br-clm-016-commit-only-on-success)). |
| `ChangeContext` | `Protected Overridable Sub` | Runs the fixed pipeline `OnContextChanged` → `OnCheckSecurity` → `OnRetrieve` ([BR-CLM-003](../../business-rules.md#br-clm-003-fixed-context-change-pipeline-order)). |
| `GetClaimData` | `Protected Overridable Sub` | Retrieves `clsClaimData` by claim id or claim number depending on the context. |
| `NewTaskGenerator` | `Protected Sub (Optional inMultiClaim As Boolean = False)` | Creates a `clsClaimTaskGenerator` bound to the current claim or to multiple claims ([BR-CLM-017](../../business-rules.md#br-clm-017-task-generator-claim-binding)). |
| `SaveTasks` | `Protected Overridable Function As Boolean` | Saves pending tasks; succeeds trivially when there are none ([BR-CLM-018](../../business-rules.md#br-clm-018-empty-task-set-always-saves-successfully)). |
| `CheckForSecurityOverride` | `Protected Function As Boolean` | Looks up a per-claim, per-user override grant via `ClaimServices.HasOverrideAcess`. |
| `OnContextChanged` | `Protected Overrides Sub` | Loads the claim for the new context and marks context set/not-set based on validity ([BR-CLM-004](../../business-rules.md#br-clm-004-context-validity-requires-a-valid-retrieved-claim)). |
| `OnCheckSecurity` | `Protected Overrides Sub` | Evaluates claim confidentiality and applies the only hard-blocking rule (conflict access) ([BR-CLM-005](../../business-rules.md#br-clm-005-view-only-by-default), [BR-CLM-006](../../business-rules.md#br-clm-006-conflict-claim-denial-with-override)). |
| `OnValidContext` | `Protected Overrides Function As Boolean` | Returns whether the context is set, access is not denied, and the claim is valid ([BR-CLM-019](../../business-rules.md#br-clm-019-valid-context-requires-set-allowed-and-valid-claim)). |
| `OnInitialize` | `Protected Overrides Sub` | Pins the database user to `CLM` and seeds the initial prompt message ([BR-CLM-013](../../business-rules.md#br-clm-013-claim-database-user-pinned-to-clm)). |
| `OnCreateDataLayer` | `Protected Overrides Sub` | Creates the Oracle claim data portal; wraps connection failures as `ApplicationException` ([BR-CLM-014](../../business-rules.md#br-clm-014-connection-failure-surfaces-as-application-exception)). |
| `OnTransactionStart` | `Protected Overrides Sub` | Begins a database transaction only when none is already pending ([BR-CLM-015](../../business-rules.md#br-clm-015-single-transaction-per-save)). |
| `OnTransactionStop` | `Protected Overrides Sub (inCommit As Boolean)` | Commits or rolls back the pending transaction ([BR-CLM-016](../../business-rules.md#br-clm-016-commit-only-on-success)). |

Members left abstract for derived managers: `OnRetrieve()` and `OnWrite()` (still `MustOverride` from `AppManagerBase`).*

## Inherited public members

Members in this section are inherited from `AppManagerBase` in `SAIF.Application`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `SecurityRole` | `Public ReadOnly Property As AppSecurityRole` | Coarse access classification (`NoAccess`/`ViewOnly`/`Updateable`) set by `MarkNoAccess`/`MarkViewOnly`/`MarkUpdate`.† | `SAIF.Application` — `AppManagerBase` |
| `MarkViewOnly` / `MarkNoAccess` / `MarkUpdate` | `Protected Sub` | Set the coarse security role used by `IsUpdateable`/`IsViewOnly`/`IsRestricted`.† | `SAIF.Application` — `AppManagerBase` |
| `Message` | `Public Property As String` | User-facing status/error text surfaced by context and save operations.† | `SAIF.Application` — `AppManagerBase` |
| `SecurityPrincipal` | `Protected ReadOnly Property As clsSecurityPrincipal` | The identity supplied at construction, used throughout claim security evaluation.† | `SAIF.Application` — `AppManagerBase` |

## Behavioral notes
- Security decisions are advisory: `OnCheckSecurity` can only downgrade access to `ViewOnly` or `NoAccess`; a derived manager must call `MarkUpdate()` itself to enable editing ([BR-CLM-005](../../business-rules.md#br-clm-005-view-only-by-default)).
- `OnCheckSecurity` dereferences `ClaimData` without a null guard; whether a worker-only context or a failed `GetClaimData` can reach this path in production is unknown.**
- Every hand-written type in this library is `<Serializable()>`, consistent with WebForms session/view-state persistence of manager state.*

## Constraints and usage notes
- Derived managers must implement `OnRetrieve()` and `OnWrite()`; this base class supplies no default screen-retrieval or persistence behavior.
- `Retrieve()` always returns `False`; callers must inspect `Message`, `ValidContext`, or manager state to determine success ([BR-CLM-020](../../business-rules.md#br-clm-020-retrieve-never-reports-success)).

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified. Statements marked with
> † were retrieved from dependency library documentation via the Legends CLI RAG service. They
> describe inherited behavior from the indicated origin library and should be verified if the
> dependency version changes.

## Sources
- `SAIF.Application.Claim/ClaimAppManager.vb`
